package office.tool.scheduletask;

import java.util.Calendar;
import java.util.TimerTask;

import org.apache.log4j.Logger;

import office.service.sale.ICustomerCareService;
import platform.common.exception.BusinessException;

public class SendCustomerCare  extends TimerTask {
	private ICustomerCareService customerCareService;
	public Logger log = Logger.getLogger(this.getClass());
	public void run() {
		try {
			int monthDate = 25;
				//Integer.parseInt(Util.parsePropertiesReturnStr("project", "monthDate"));
			Calendar calendar = Calendar.getInstance();
		    int day = calendar.get(Calendar.DAY_OF_MONTH);
		    if(monthDate==day){
		    	customerCareService.sendNote();
		    }
		} catch (BusinessException e) {
			log.error("", e);
		}
	}
	public ICustomerCareService getCustomerCareService() {
		return customerCareService;
	}
	public void setCustomerCareService(ICustomerCareService customerCareService) {
		this.customerCareService = customerCareService;
	}
}
